{% macro vod(appId, name, region, videoInfo) %}
<div class="form-group  row">
    <label for="title" class="col-sm-2 col-form-label">上传视频 :</label>
    <div class="col-sm-5">
            <div id="uploadVideo">
                <input type="file" style="display:none;" ref="vVodFile" @change="vVodUpload($event)" id="videoFileId" />
                <div class="btn btn-default btn-sm pr" style="width: 150px;margin-bottom: 10px;">
                    <i @click="vVodAdd" class="fa fa-cloud-upload">上传视频</i>
                </div>
                <div id="vodDiv" style="display:none">
                 <video id="vreview"  width="400" height="250" preload="meta" playsinline webkit-playsinline></video>
                </div>
               
            </div>
    </div>
    <div class="col-sm-3">
        <div id="txUploadProgress" style="display: none"></div>
    </div>
</div>
    <script>
        uploadVideo("{{ appId }}", "{{ name }}", "uploadVideo", "videoFileId",60, "{{ path('admin_api_glob_tengxunyunSignatureDo') }}", "{{ path('admin_api_glob_tengxunyunVodAndvancePlaySignDo') }}");
        {% if videoInfo and videoInfo["videoId"] != "" and videoInfo["status"] ==1 %}
        //预览
        axios
            .get("{{ path('admin_api_glob_tengxunyunVodAndvancePlaySignDo') }}" + "?videoId=" + "{{ videoInfo['videoId'] }}")
            .then(function (response) {
            if (response.data.code != 200) {
                return showMsg(400, response.data.message);
            }
            var token = response.data.data;

     var videostr =
        '<video id="vreview"  width="400" height="250" preload="meta" playsinline webkit-playsinline></video>';
            $("#vodDiv").html(videostr);
            vodPlay("vreview", "{{ videoInfo['videoId'] }}",  "{{ appId }}", token);
            $("#vreview").show();
            $("#vodDiv").show();
            });
        {% endif %}
    </script>
{% endmacro %}
